package com.aestheticshare.main;

import android.support.v4.app.Fragment;
import android.widget.ImageButton;

import com.googlecode.androidannotations.annotations.AfterViews;
import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EFragment;
import com.googlecode.androidannotations.annotations.ViewById;

@EFragment(R.layout.fragment_sign_in)
public class SignInFragment extends Fragment {
	@ViewById ImageButton facebookSignInButton;
	@ViewById ImageButton twitterSignInButton;
	
	@Click(R.id.facebookSignInButton)
	void facebookSignIn() {
		PopupWebActivity.popup(getActivity(), Utils.URL_AUTH_FACEBOOK, Utils.REQUEST_CODE_AUTH);		
	}

	@Click(R.id.twitterSignInButton)
	void twitterSignIn() {
		PopupWebActivity.popup(getActivity(), Utils.URL_AUTH_TWITTER, Utils.REQUEST_CODE_AUTH);		
	}
	
	@AfterViews
	void initialize(){
		facebookSignInButton.setOnTouchListener(Utils.IMAGE_BUTTON_ONCLICK_EFFECT_TOUCH_LISTENER);
		twitterSignInButton.setOnTouchListener(Utils.IMAGE_BUTTON_ONCLICK_EFFECT_TOUCH_LISTENER);
	}
	
}
